Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] assert resolver.model is ModelNode prior to resolving event_time_filter #10975

Merged
merged 2 commits into from
Nov 6, 2024

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Nov 5, 2024

Resolves #10928

Problem

From the issue:

When running a macro that executes ref() with a microbatch model name, an error occurs: 'Macro' object has no attribute 'config'

This error could surface from any resolver context that has a non-model node, since event_time_filters should only be resolved for microbatch incremental model nodes.

Solution

add an additional isinstance check on resolver.model to ensure it's actually a model prior to trying to resolve an event time fitler.

Checklist

  • I have read the contributing guide and understand what's expected of me.
  • I have run this code in development, and it appears to resolve the stated issue.
  • This PR includes tests, or tests are not required or relevant for this PR.
  • This PR has no interface changes (e.g., macros, CLI, logs, JSON artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX.
  • This PR includes type annotations for new and modified functions.

@cla-bot cla-bot bot added the cla:yes label Nov 5, 2024
Copy link
Contributor

github-actions bot commented Nov 5, 2024

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.08%. Comparing base (bdf28d7) to head (3ec36bb).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10975      +/-   ##
==========================================
- Coverage   89.14%   89.08%   -0.06%     
==========================================
  Files         183      183              
  Lines       23553    23553              
==========================================
- Hits        20996    20983      -13     
- Misses       2557     2570      +13     
Flag Coverage Δ
integration 86.38% <ø> (-0.13%) ⬇️
unit 62.76% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
Unit Tests 62.76% <ø> (ø)
Integration Tests 86.38% <ø> (-0.13%) ⬇️

@MichelleArk MichelleArk marked this pull request as ready for review November 6, 2024 20:33
@MichelleArk MichelleArk requested a review from a team as a code owner November 6, 2024 20:33
@MichelleArk MichelleArk requested a review from QMalcolm November 6, 2024 20:56
Copy link
Contributor

@QMalcolm QMalcolm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@MichelleArk MichelleArk merged commit 30b8a92 into main Nov 6, 2024
61 of 62 checks passed
@MichelleArk MichelleArk deleted the safer-resolve-event-time-filter branch November 6, 2024 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Microbatch: Calling ref() in a macro with a microbatch model name results in error
2 participants